package shuai.model;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

@Component
public class Computer {
	//@Autowired
	@Resource
	private MainFrame mainFrame;
	/*@Autowired
	@Qualifier("sanXing")
	//qualifier后面是属性的名字第一个字母小写
*/
	@Resource(name="aoc")
	private Display display;
	
	public Computer() {
	}

	public Computer(MainFrame mainFrame, Display display) {
		this.mainFrame = mainFrame;
		this.display = display;
	}

	public void printComputerInfo(){
		System.out.println("配置如下：");
		mainFrame.printMainFrame();
		display.printDisplayInfo();
	}
	
	public MainFrame getMainFrame() {
		return mainFrame;
	}
	public void setMainFrame(MainFrame mainFrame) {
		this.mainFrame = mainFrame;
	}
	public Display getDisplay() {
		return display;
	}
	public void setDisplay(Display display) {
		this.display = display;
	}
	
	
}
